package org.needcoke.hs.bean;

import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * 拦截规则
 */
@Data
@Accessors(chain = true)
@ToString
public class InterceptRule {

    private Long id;

    /**
     * 协议,目前仅支持http/https
     */
    private String agreement;

    /**
     * ip  / 域名
     */
    private String host;

    /**
     * 端口
     */
    private String port;

    /**
     * 路径
     */
    private String path;

    /**
     * url group 组名
     */
    private String urlGroupName;

    public InterceptRule copy(){
        return new InterceptRule()
                .setAgreement(agreement)
                .setHost(host)
                .setId(id)
                .setPath(path)
                .setPort(port)
                .setUrlGroupName(urlGroupName);
    }

}
